3.261 \(\int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx\)

Optimal. Leaf size=72 \[ -\frac{(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac{(2 a-b) \log (\cos (c+d x)+1)}{4 d}-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d} \]

[Out]

-((2*a + b)*Log[1 - Cos[c + d*x]])/(4*d) - ((2*a - b)*Log[1 + Cos[c + d*x]])/(4*d) - (Cot[c + d*x]^2*(a + b*Se
c[c + d*x]))/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.108431, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {3882, 3883, 2668, 633, 31} \[ -\frac{(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac{(2 a-b) \log (\cos (c+d x)+1)}{4 d}-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

-((2*a + b)*Log[1 - Cos[c + d*x]])/(4*d) - ((2*a - b)*Log[1 + Cos[c + d*x]])/(4*d) - (Cot[c + d*x]^2*(a + b*Se
c[c + d*x]))/(2*d)

Rule 3882

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[((e*Cot[c
+ d*x])^(m + 1)*(a + b*Csc[c + d*x]))/(d*e*(m + 1)), x] - Dist[1/(e^2*(m + 1)), Int[(e*Cot[c + d*x])^(m + 2)*(
a*(m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && LtQ[m, -1]

Rule 3883

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))/cot[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[(b + a*Sin[c + d*x])/Cos[
c + d*x], x] /; FreeQ[{a, b, c, d}, x]

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \cot ^3(c+d x) (a+b \sec (c+d x)) \, dx &=-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac{1}{2} \int \cot (c+d x) (-2 a-b \sec (c+d x)) \, dx\\ &=-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac{1}{2} \int (-b-2 a \cos (c+d x)) \csc (c+d x) \, dx\\ &=-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac{a \operatorname{Subst}\left (\int \frac{-b+x}{4 a^2-x^2} \, dx,x,-2 a \cos (c+d x)\right )}{d}\\ &=-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}+\frac{(2 a-b) \operatorname{Subst}\left (\int \frac{1}{2 a-x} \, dx,x,-2 a \cos (c+d x)\right )}{4 d}+\frac{(2 a+b) \operatorname{Subst}\left (\int \frac{1}{-2 a-x} \, dx,x,-2 a \cos (c+d x)\right )}{4 d}\\ &=-\frac{(2 a+b) \log (1-\cos (c+d x))}{4 d}-\frac{(2 a-b) \log (1+\cos (c+d x))}{4 d}-\frac{\cot ^2(c+d x) (a+b \sec (c+d x))}{2 d}\\ \end{align*}

Mathematica [A]  time = 1.35824, size = 114, normalized size = 1.58 \[ -\frac{a \left (\cot ^2(c+d x)+2 \log (\tan (c+d x))+2 \log (\cos (c+d x))\right )}{2 d}-\frac{b \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{b \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}-\frac{b \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}+\frac{b \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

-(b*Csc[(c + d*x)/2]^2)/(8*d) + (b*Log[Cos[(c + d*x)/2]])/(2*d) - (b*Log[Sin[(c + d*x)/2]])/(2*d) - (a*(Cot[c
+ d*x]^2 + 2*Log[Cos[c + d*x]] + 2*Log[Tan[c + d*x]]))/(2*d) + (b*Sec[(c + d*x)/2]^2)/(8*d)

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 85, normalized size = 1.2 \begin{align*} -{\frac{ \left ( \cot \left ( dx+c \right ) \right ) ^{2}a}{2\,d}}-{\frac{a\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}-{\frac{b\cos \left ( dx+c \right ) }{2\,d}}-{\frac{b\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3*(a+b*sec(d*x+c)),x)

[Out]

-1/2/d*a*cot(d*x+c)^2-1/d*a*ln(sin(d*x+c))-1/2/d*b/sin(d*x+c)^2*cos(d*x+c)^3-1/2/d*b*cos(d*x+c)-1/2/d*b*ln(csc
(d*x+c)-cot(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.979701, size = 84, normalized size = 1.17 \begin{align*} -\frac{{\left (2 \, a - b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) +{\left (2 \, a + b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac{2 \,{\left (b \cos \left (d x + c\right ) + a\right )}}{\cos \left (d x + c\right )^{2} - 1}}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

-1/4*((2*a - b)*log(cos(d*x + c) + 1) + (2*a + b)*log(cos(d*x + c) - 1) - 2*(b*cos(d*x + c) + a)/(cos(d*x + c)
^2 - 1))/d

________________________________________________________________________________________

Fricas [A]  time = 0.72683, size = 254, normalized size = 3.53 \begin{align*} \frac{2 \, b \cos \left (d x + c\right ) -{\left ({\left (2 \, a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, a + b\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) -{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - 2 \, a - b\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 2 \, a}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(2*b*cos(d*x + c) - ((2*a - b)*cos(d*x + c)^2 - 2*a + b)*log(1/2*cos(d*x + c) + 1/2) - ((2*a + b)*cos(d*x
+ c)^2 - 2*a - b)*log(-1/2*cos(d*x + c) + 1/2) + 2*a)/(d*cos(d*x + c)^2 - d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \cot ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3*(a+b*sec(d*x+c)),x)

[Out]

Integral((a + b*sec(c + d*x))*cot(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.27541, size = 230, normalized size = 3.19 \begin{align*} -\frac{2 \,{\left (2 \, a + b\right )} \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 8 \, a \log \left ({\left | -\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac{{\left (a + b + \frac{4 \, a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac{2 \, b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}{\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac{a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac{b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

-1/8*(2*(2*a + b)*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - 8*a*log(abs(-(cos(d*x + c) - 1)/(cos(d*x
 + c) + 1) + 1)) - (a + b + 4*a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 2*b*(cos(d*x + c) - 1)/(cos(d*x + c) +
 1))*(cos(d*x + c) + 1)/(cos(d*x + c) - 1) - a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + b*(cos(d*x + c) - 1)/(c
os(d*x + c) + 1))/d